ZhiHuiBuGuide={}
--ZhiHuiBuGuideFunc={}
--ZhiHuiBuGuideFunc.__index = XunLianYingGuideFunc
--setmetatable(ZhiHuiBuGuide, XunLianYingGuideFunc)
ZhiHuiBuGuide.state=-1
ZhiHuiBuGuide.showXunLianYing = function(self)
  setTouchEnabledAll(MainScene.node, false)
  MainScene.addMask(1001)
  setTouchEnabledAll(MainScene.getBuilding(1001), true)
end
ZhiHuiBuGuide.upgrade = function(self)
  setTouchEnabledAll(XunLianYinggScene.instance.node, false)
  local b = TypeCast(XunLianYinggScene.instance.node:getChildByTag(1020), "CCButton")
  b:setEnabled(true)
end
ZhiHuiBuGuide.close = function(self)
  setTouchEnabledAll(XunLianYinggScene.instance.node, false)
  TypeCast(XunLianYinggScene.instance.node:getChildByTag(1111), "CCButton"):setEnabled(true)
end
ZhiHuiBuGuide.nextStep = function(self)
  print("ZhiHuiBuGuide.nextStep", XunLianYingGuide.state)
  if ZhiHuiBuGuide.state==-1 then
    ZhiHuiBuGuide.showXunLianYing()    
    ZhiHuiBuGuide.state=0
  elseif ZhiHuiBuGuide.state==0 then
    ZhiHuiBuGuide.upgrade()
    ZhiHuiBuGuide.state=1
  elseif ZhiHuiBuGuide.state==1 then
    ZhiHuiBuGuide.close() 
    ZhiHuiBuGuide.state=2
  end
end
